---
title: PdfResult
summary: API reference for PdfResult.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-17
library: PdfAPI.Core
reference_type: package
---

# PdfResult

`PdfResult` is the result contract returned by every operation in the PDF platform — conversion, merge, and extraction all produce a `PdfResult`. Its multiple constructors set `Status` based on which constructor is invoked (success, failure, or source-type variants), and disposing a `PdfResult` cascades to its `Document`, deleting the backing file.

## Purpose
- Carries the outcome (`Status`), timing (`Elapsed`), and produced `Document` of a PDF operation.
- Records which processing engine (`PdfProcessorType`) and, for conversions, which source format (`SourceConversionType`) were involved.
- Derives its `Status` and identifying fields from the constructor used to create it. ([BR-40](../../business-rules.md#br-40-result-inherits-request-identifier-and-image-id), [BR-45](../../business-rules.md#br-45-result-status-by-constructor))

## Context
- Namespace: `PdfAPI.Core`
- Assembly/package: `PdfAPI.Core`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Id | `Guid Id { get; set; }` | The result's own generated identity. |
| RequestId | `Guid RequestId { get; set; }` | The identity of the request this result answers; inherited from the originating `PdfRequest.Id`. ([BR-40](../../business-rules.md#br-40-result-inherits-request-identifier-and-image-id)) |
| Options | `PdfOptions Options { get; set; }` | The output options that were applied when producing this result. |
| Message | `string Message { get; set; }` | A human-readable summary, such as the extracted page expression. ([BR-18](../../business-rules.md#br-18-extraction-result-records-processor-and-page-expression)) |
| Elapsed | `TimeSpan Elapsed { get; set; }` | The time taken to produce this result. |
| Extension | `string Extension { get; set; }` | The file extension of the produced output. |
| OutputType | `string OutputType { get; set; }` | The type descriptor of the produced output. |
| OutputFormat | `PdfFormat OutputFormat { get; set; }` | The output format actually produced. |
| ImageId | `long ImageId { get; set; }` | The identifier of the associated image record, when applicable. ([BR-40](../../business-rules.md#br-40-result-inherits-request-identifier-and-image-id)) |
| TrackingId | `long TrackingId { get; set; }` | The tracking record identifier associated with this result, when tracking is enabled. |
| PdfProcessorType | `PdfProcessorType PdfProcessorType { get; set; }` | The processing engine that produced this result. ([BR-18](../../business-rules.md#br-18-extraction-result-records-processor-and-page-expression)) |
| SourceConversionType | `SourceConversionType SourceConversionType { get; set; }` | The originating source format behind a conversion, when set by the source-type constructor. |
| ConversionLog | `Document ConversionLog { get; set; }` | An optional log document describing the conversion process. |
| ErrCode | `[Obsolete] long ErrCode { get; set; }` | Legacy numeric error code retained for backward compatibility.* |
| Document | `Document Document { get; set; }` | The document produced by the operation. |
| Status | `PdfStatus Status { get; set; }` | The outcome status of the operation, set according to which constructor was used. ([BR-45](../../business-rules.md#br-45-result-status-by-constructor)) |
| PdfResult (success, failure, source-type constructors) | `PdfResult(PdfRequest)`, `PdfResult(PdfRequest, Exception)`, `PdfResult(PdfRequest, SourceConversionType)` | Construct a result in the appropriate `Status` for the outcome being represented. ([BR-45](../../business-rules.md#br-45-result-status-by-constructor)) |
| ToString() | `override string ToString()` | Renders a diagnostic summary of the result. |
| ToString(string) | `string ToString(string prefix)` | Renders a diagnostic summary of the result with a caller-supplied prefix. |
| Dispose() | `void Dispose()` | Disposes `Document`, deleting its backing file. ([BR-24](../../business-rules.md#br-24-disposing-a-document-deletes-its-file)) |

## Behavioral notes
- Disposing a `PdfResult` cascades to disposing `Document`, which deletes the produced file from disk. ([BR-24](../../business-rules.md#br-24-disposing-a-document-deletes-its-file))
- `ErrCode` is marked obsolete, indicating diagnostics have moved to `Status` and `Message`.*

## Constraints and usage notes
- Do not dispose a `PdfResult` before the caller has finished reading or persisting its `Document` elsewhere, since disposal deletes the underlying file.

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Related documentation
- [Index](../../index.md)
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Dependencies](../../dependencies.md)
- [Operations and processes](../../operations-processes.md)
- [Business rules](../../business-rules.md)
- [Security and authorization](../../security-authorization.md)
- [API reference](../index.md)

## Sources
- `PdfAPI.Core\PdfResult.cs`
